#include "mdb.h"

#define BEGIN_TIMING(_tv_)	gettimeofday( & (_tv_) , NULL );
#define END_TIMING(_tv_)	{ \
					struct timeval	end ; \
					gettimeofday( & end , NULL ); \
					(_tv_).tv_sec = end.tv_sec - (_tv_).tv_sec ; \
					(_tv_).tv_usec = end.tv_usec - (_tv_).tv_usec ; \
					if( (_tv_).tv_usec < 0 ) \
					{ \
						(_tv_).tv_sec--; \
						(_tv_).tv_usec += 1000000 ; \
					} \
				} \

struct UserInfo
{
	uint32_t	uid ;
	char		user_name[ 20+1 ] ;
	char		email[ 40+1 ] ;
} ;

int TTSelectBatch_user_info( struct MemTable *table , struct UserInfo *user_info_array , size_t user_info_array_size );

struct UserFriendRelation
{
	char	user_name[ 20+1 ] ;
	char	friend_name[ 20+1 ] ;
} ;

int TTSelectBatch_user_friend_relation( struct MemTable *table , struct UserFriendRelation *user_friend_relation_array , size_t user_friend_relation_array_size );

